package login;

import org.apache.curator.framework.recipes.leader.Participant;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.mapreduce.Partitioner;

public class MyPartition extends Partitioner<MemberDate,LongWritable> {

    @Override
    public int getPartition(MemberDate memberDate, LongWritable longWritable, int numPartitions) {
        if (memberDate.username.startsWith("A")){
            return 0;
        }
        else {
            return 1;
        }
}
}